<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.tjsinfo.tjsoa.common.PageController"%>
<%@page import="com.tjsinfo.tjsoa.worklog.vo.WorkLogMain"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="<%=basePath%>"/>
    
   
    
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>粮油集团办公自动化协作平台</title>
<link href="style/txlz7.css" rel="stylesheet" type="text/css" />
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript">
		function page2()
		{
			document.from1.submit();
			
		}
	</script>
  </head>
  
  <body>
  	<%
  		List list = (List)request.getAttribute("list");
  		int i = 1;
  		Iterator iterator = list.iterator();
  		Integer userid = (Integer)request.getAttribute("userid");
  	%>
   <div id="right" style="overflow: scroll;">
      <div class="p_011">
		    <ul>
                <li class="s09"><a href="<%=basePath%>tjsinfo/tjsoa/worklog/checkDefalntWorkLogDateModle.do?id=<%=userid %>">日报</a></li>
                <li class="s09"><a href="<%=basePath%>tjsinfo/tjsoa/worklog/checkDefalntWorkLogWeekModle.do?id=<%=userid %>">周报</a></li>
                <li class="s09"><a href="<%=basePath%>tjsinfo/tjsoa/worklog/checkDefalntWorkLogMonthModle.do?id=<%=userid %>">月报</a></li>
                <li class="s09"><a href="<%=basePath%>tjsinfo/tjsoa/worklog/checkDefalntWorkLogMonthJiDuModle.do?id=<%=userid %>">季报</a></li>
                <li class="s09"><a href="<%=basePath%>tjsinfo/tjsoa/worklog/checkworkLogHalfYearModle.do?id=<%=userid %>">半年报</a></li>
                <li class="s09"><a href="<%=basePath%>tjsinfo/tjsoa/worklog/checkworkLogYearModle.do?id=<%=userid %>">年报</a></li>
                <li class="s09"><a href="<%=basePath%>tjsinfo/tjsoa/worklog/checkDefalntWorkLog.do">返回</a></li>
            </ul>
	  </div>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" height="92%" >
          <tr>
            <td width="99%" valign="top" height="100%">
               <div class="contabyear">
                  <table class="p_06" width="100%" border="0" cellspacing="0">
                      <tr>
                        <th width="30%">年份</th>
                        <th width="30%">状态</th>
                        <th width="40%">操作</th>
                      </tr>
                      <%
                      	while(iterator.hasNext())
                      	{
                      		WorkLogMain workLogMain = (WorkLogMain)iterator.next();
                      		if(i % 2 == 0)
                      		{
                      %>
                      <tr>
                        <td><%=workLogMain.getNumber() %>年</td>
                        <td>
                        	<%
                        		if(workLogMain.getStart() == 1)
                        		{
                        			out.print("已制定");
                        		}
                        		else if(workLogMain.getStart() == 2)
                        		{
                        			out.print("已查阅");
                        		}
                        		else 
                        		{
                        			out.print("已完成");
                        		}
                        	%>
                        </td>
                        <td>
                        	<%
                        	if(workLogMain.getStart() == 1)
                    		{
                    		%>
                    		 <a href="<%=basePath%>tjsinfo/tjsoa/worklog/InstructionWorkLogFrom.do?id=<%=workLogMain.getId() %>">批示</a> | <a href="<%=basePath%>tjsinfo/tjsoa/worklog/selectWorkLog.do?id=<%=workLogMain.getId() %>">查看</a></td>		
                    		<% 	
                    		}
                    		else if(workLogMain.getStart() == 2)
                    		{
                    		%>
                    		<a href="<%=basePath%>tjsinfo/tjsoa/worklog/InstructionWorkLogFrom.do?id=<%=workLogMain.getId() %>">批示</a>  |<a href="<%=basePath%>tjsinfo/tjsoa/worklog/selectWorkLog.do?id=<%=workLogMain.getId() %>">查看</a>
                    		<% 	
                    		}
                    		else 
                    		{
                    		%>
                    		<a href="<%=basePath%>tjsinfo/tjsoa/worklog/selectWorkLog.do?id=<%=workLogMain.getId() %>">查看</a>
                    		<% 	
                    		}
                        	%>
                        
                      </tr>
                      <% 			
                      		}
                      		else
                      		{
                      %>
                      	<tr bgcolor="#F4F4F4">
                        <td><%=workLogMain.getNumber() %>年</td>
                        <td>
                        	<%
                        		if(workLogMain.getStart() == 1)
                        		{
                        			out.print("已制定");
                        		}
                        		else if(workLogMain.getStart() == 2)
                        		{
                        			out.print("已查阅");
                        		}
                        		else 
                        		{
                        			out.print("已完成");
                        		}
                        	%>
                        </td>
                        <td >
                        <%
                        	if(workLogMain.getStart() == 1)
                    		{
                    		%>
                    		 <a href="<%=basePath%>tjsinfo/tjsoa/worklog/InstructionWorkLogFrom.do?id=<%=workLogMain.getId() %>">批示</a> | <a href="<%=basePath%>tjsinfo/tjsoa/worklog/selectWorkLog.do?id=<%=workLogMain.getId() %>">查看</a></td>		
                    		<% 	
                    		}
                    		else if(workLogMain.getStart() == 2)
                    		{
                    		%>
                    		<a href="<%=basePath%>tjsinfo/tjsoa/worklog/InstructionWorkLogFrom.do?id=<%=workLogMain.getId() %>">批示</a>  |<a href="<%=basePath%>tjsinfo/tjsoa/worklog/selectWorkLog.do?id=<%=workLogMain.getId() %>">查看</a>
                    		<% 	
                    		}
                    		else 
                    		{
                    		%>
                    		<a href="<%=basePath%>tjsinfo/tjsoa/worklog/selectWorkLog.do?id=<%=workLogMain.getId() %>">查看</a>
                    		<% 	
                    		}
                        	%>
                      </tr>
                      <% 			
                      		}
                      %>
                      	
                      <% 		
                      	}
                      %>
                      <tr align="center">
                        <td colspan="7">
          <div class="page" style="height: 50px;">
           <%PageController pageController = (PageController)request.getAttribute("pageController");
   		Integer  totalpage =	pageController.getPageCount();
   		out.print("共"+totalpage + "页,"); 
   		out.print("当前为第"+pageController.getCurrentPageNum() + "页,");
   		if(pageController.getCurrentPageNum() != 1 && list.size() >0)
   		{
   			int page2 = pageController.getCurrentPageNum(); 
   		%>
   			<a href="<%=basePath%>tjsinfo/tjsoa/worklog/checkworkLogYearModle.do?start=up&page=<%=page2%>&id=<%=userid %>">上一页</a>
   		<% 
   		}	
   		
		if(pageController.getCurrentPageNum() != pageController.getPageCount() && list.size() > 0)
   		{
   			int page2 = pageController.getCurrentPageNum(); 
   		%>
   			<a href="<%=basePath%>tjsinfo/tjsoa/worklog/checkworkLogYearModle.do?start=down&page=<%=page2%>&id=<%=userid %>">下一页</a>
   		<% 
   		}
   		
   		%><form name="from1" action="<%=basePath%>tjsinfo/tjsoa/worklog/checkworkLogYearModle.do" method="post">
   			跳转到<select name="page" onchange="page2()">
   				<%
   					int total = pageController.getPageCount();
   					for(int a =1;a<=total;a++)
   					{
   						if(a == pageController.getCurrentPageNum())
   						{
   				%>
   					<option value="<%=a%>" selected="selected"><%=a%>
   				<% 		
   						}
   						else 
   						{
   				%>
   					<option value="<%=a%>"><%=a%>   				
   				<% 		
   						}
   					}
   		
   				%>
   				
   			</select>页
   			<input  type="hidden" name="id" value="<%=userid %>"/>
   		</form>                   
                          
                          
                 </div>
                        </td>
                    </tr>
                 </table>
              </div>
            </td>
          </tr>
      </table>
</div>
  </body>
</html>
